/**
 * Created by guozqiu on 2017/5/12.
 */

$(document).ready(function(){
   $('footer').on('click','ul>li',function(){
       window.location.href = window.location.origin + '/' + $(this).attr('page');
   });

    /**
     * 底部菜单根据url地址设置哪一个菜单选中
     */
   $('footer ul>li').each(function(){
       var page = $(this).attr('page');
       if(location.href.indexOf(page)>0){
           $(this).addClass('active');
       }
   });
});

/**
 * 检测是否更新
 * @returns {boolean}
 */
function checkIsLogin() {
    if(localStorage.getItem('accessToken')){
        return true;
    }
    return false;
}
